import request from '@/utils/request'

// 登录接口
export function login(data) {
  return request({
    url: '/login',
    method: 'post',
    data
  })
}

// 注册接口
export function register(data) {
  return request({
    url: '/register',
    method: 'post',
    headers: {
      'Content-Type': 'application/json',
      'Accept': 'application/json'
    },
    data
  })
}

// 验证账户信息
export function verifyAccount(data) {
  return request({
    url: '/forget/verify',
    method: 'post',
    data
  })
}

// 修改密码
export function updatePassword(username, data) {
  return request({
    url: `/forget/password?username=${username}`,
    method: 'put',
    data
  })
} 